<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>收集表单数据</title>
    <!-- 引入Vue -->
    <script type="text/javascript" src="../../js/vue.js"></script>
  </head>
  <body>
    <!-- 准备好一个容器-->
    <div id="demo">
      <form action="">
        账号：<input v-model="account" type="text"> <br><br>
        密码：<input v-model="password" type="password"> <br><br>
        性别：
          男<input v-model="gender" value="male" type="radio" name="sex"> 
          女<input v-model="gender" value="female" type="radio" name="sex"> <br><br>
        爱好：
          抽烟<input id="s1" v-model="hobby" value="smoke" type="checkbox">
          喝酒<input id="s2" v-model="hobby" value="drink" type="checkbox">
          烫头<input id="s3" v-model="hobby" value="perm" type="checkbox"> <br><br>
        所属校区：
          <select v-model="city">
            <option value="">请选择校区</option>
            <option value="beijing">北京</option>
            <option value="shenzhen">深圳</option>
            <option value="shanghai">上海</option>
            <option value="wuhan">武汉</option>
            <option value="xian">西安</option>
            <option value="chengdu">成都</option>
          </select> <br><br>
        其他信息：<textarea v-model="other"></textarea> <br><br>
        <input type="checkbox" v-model="agree">阅读并接受<a href="#">《用户协议》</a> <br><br>
        <button>提交</button>
      </form>
    </div>

    <script type="text/javascript">
      new Vue({
        el:'#demo',
        data:{
          account:'',
          password:'',
          gender:'male',
          hobby:['perm'],
          city:'',
          other:'',
          agree:''
        }
      })
    </script>
  </body>
</html>